package com.fowo.api.jm;

import com.fowo.api.jm.functions.FileImageUrlFunction;
import com.googlecode.aviator.AviatorEvaluatorInstance;
import org.jeecg.modules.jmreport.desreport.express.enhance.IJmExpressCustom;
import org.springframework.stereotype.Component;

/**
 * 用于给积木报表注册自定义函数
 * @author yl_ls
 */
@Component
public class JmExpressionCustomImpl implements IJmExpressCustom {
    @Override
    public void addFunction(AviatorEvaluatorInstance aviatorEvaluatorInstance) {
        FileImageUrlFunction fileImageUrlFunction = new FileImageUrlFunction();
        aviatorEvaluatorInstance.addFunction(fileImageUrlFunction.getName(), fileImageUrlFunction);
    }
}
